package com.muyu.danmo.domain;

import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;


/**
 * 时政要闻对象 danmo_news
 *
 * @author yangle
 * @date 2024-09-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class DanmoNews extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 新闻id
 */
    private Long newsId;

    /** 新闻标题 */
    @Excel(name = "新闻标题")
    private String newsHeadlines;

    /** 新闻来源 */
    @Excel(name = "新闻来源")
    private String newsSource;

    /** 新闻内容 */
    @Excel(name = "新闻内容")
    private String newsScontent;

    /** 新闻状态（1 正常 2 删除） */
    @Excel(name = "新闻状态", readConverterExp = "1=,正=常,2=,删=除")
    private Long newsStates;

    @Excel(name = "用户id")
    private Long userId;
    /**
     * 基本信息
     */
   private DanmoInformationBasic danmoInformationBasic;

    /** 新闻图片信息 */
    private List<DanmoNewsPhone> danmoNewsPhoneList;

    /** 富文本 */
    @Excel(name = "富文本")
    private String richText;
    /** 主图 */
    @Excel(name = "主图")
    private String mainPicture;
   /** 浏览量 */
    @Excel(name = "浏览量")
    private Long views;

    @Excel(name = "新闻类型（1 app 2 官网书坛要闻  3 通知公告）")
    private Long types;
    private Integer pageNum = 1;
    private Integer pageSize = 10;
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("newsId", getNewsId())
            .append("newsHeadlines", getNewsHeadlines())
            .append("newsSource", getNewsSource())
            .append("newsScontent", getNewsScontent())
            .append("newsStates", getNewsStates())
                .append("richText", getRichText())
                .append("mainPicture", getMainPicture())
                .append("views", getViews())
                .append("types", getTypes())
                .append("userId", getUserId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("danmoNewsPhoneList", getDanmoNewsPhoneList())

            .toString();
    }
}
